package com.shemy.sshiro.service.impl;

import com.shemy.sshiro.domain.SysRole;
import javax.annotation.Resource;
import com.shemy.sshiro.dao.SysRoleMapper;
import com.shemy.sshiro.service.SysRoleService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *  角色ServiceImpl
 * @author Dzsom
 * @date 2019-05-09 10:56
 */
@Service
public class SysRoleServiceImpl implements SysRoleService{

    @Resource
    private SysRoleMapper sysRoleMapper;

    @Override
    public int deleteByPrimaryKey(Integer roleId) {
        return sysRoleMapper.deleteByPrimaryKey(roleId);
    }

    @Override
    public int insert(SysRole record) {
        return sysRoleMapper.insert(record);
    }

    @Override
    public int insertSelective(SysRole record) {
        return sysRoleMapper.insertSelective(record);
    }

    @Override
    public SysRole selectByPrimaryKey(Integer roleId) {
        return sysRoleMapper.selectByPrimaryKey(roleId);
    }

    @Override
    public int updateByPrimaryKeySelective(SysRole record) {
        return sysRoleMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(SysRole record) {
        return sysRoleMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<SysRole> findByUserId(Integer userId) {
        return sysRoleMapper.findByUserId(userId);
    }

}
